Numerical integration using quad()

March 19, 2021

An integral that comes up when trying to find the chemical potential of a system of identical Bosons is:

$\int_0^\infty \dfrac{x^2}{e^{x^2-\eta}-1}\, dx$

where $\eta=\mu/k_\mathrm{B}T$ and $\mu$ is the chemical potential.

This short tutorial deminstrate how to use quad() to numberically evaluate this integral for the $\eta = 0$ case.

For this choise of the upper integration limit, there was no warning and our result for y changed by only a completely negligible amount.